home *** CD-ROM | disk | FTP | other *** search
- program TestPaint;
-
- uses Strings, WinTypes, WinProcs, WinDos, WObjects, StdDlgs,
- PaintBMP;
-
- {$R TSTPAINT.RES}
-
- const
- cm_TestW = 201;
-
- type
- TMyApplication =
- object(TApplication)
- procedure InitMainWindow; virtual;
- end;
-
- PMyWindow = ^TMyWindow;
- TMyWindow =
- object(TWindow)
- TempWin: PWinBMP;
-
- constructor Init(AParent: PWindowsObject; ATitle: PChar);
- destructor Done; virtual;
- procedure TestWindow( var Msg: TMessage); virtual cm_First + cm_TestW;
- end;
-
- {--------------------------------------------------}
- { TMyWindow's method implementations: }
- {--------------------------------------------------}
-
- constructor TMyWindow.Init(AParent: PWindowsObject; ATitle: PChar);
- begin
- TWindow.Init(AParent, ATitle);
- Attr.Menu := LoadMenu( HInstance, 'TEST_MENU');
- end;
-
- destructor TMyWindow.Done;
- begin
- TWindow.Done;
- end;
-
- procedure TMyWindow.TestWindow( var Msg: TMessage);
- begin
- TempWin := New( PWinBMP, Init( @Self, 'Popup Window with Caption', 100, 100, 300, 300,
- (ws_PopupWindow or ws_Caption or ws_Visible)));
- TempWin^.PaintBlank( 5, 5, 290, 35);
- TempWin^.ShadowFrame( 5, 15, 290, 35);
- TempWin^.ShadowHLine( 0, 299, 50);
- TempWin^.ShadowVLine( 145, 52, 299);
- end;
-
- {--------------------------------------------------}
- { TMyApplication's method implementations: }
- {--------------------------------------------------}
-
- procedure TMyApplication.InitMainWindow;
- begin
- MainWindow := New(PMyWindow, Init(nil, 'TPW: Bitmap Painting'));
- end;
-
- {--------------------------------------------------}
- { Main program: }
- {--------------------------------------------------}
-
- var
- MyApp : TMyApplication;
-
- begin
- MyApp.Init('Skeleton');
- MyApp.Run;
- MyApp.Done;
- end.
-
- {For more TPW routines, call Public (software) Library for a free newsletter.}
- {Call 800-242-4PsL or 713-524-6394.}